<template>
  <div id="app">
    <van-skeleton title :row="3" v-if="isShow" />
    <router-view v-slot="{ Component }">
      <keep-alive>
        <component :is="Component" />
      </keep-alive>
    </router-view>
  </div>
</template>

<script setup>
import { ref, watch } from 'vue'

let isShow = ref(false)

import { useRoute, useRouter } from 'vue-router'

const router = useRouter()
const route = useRoute()

watch(route, (newValue, oldValue) => {
  isShow.value = true
  if (isShow.value == true) {
    setInterval(() => {
      isShow.value = false
    }, 500)
  }
})

</script>

<style lang="scss" scoped></style>